home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / BNU22SR1.ZIP / src / binutils.2 / bfd / libecoff.h < prev    next >
C/C++ Source or Header  |  1993-05-30  |  3KB  |  97 lines

  1. /* BFD ECOFF object file private structure.
  2.    Copyright (C) 1993 Free Software Foundation, Inc.
  3.    Written by Ian Lance Taylor, Cygnus Support.
  4.  
  5. This file is part of BFD, the Binary File Descriptor library.
  6.  
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  20.  
  21. /* This is the target specific information kept for ECOFF files.  */
  22.  
  23. #define ecoff_data(abfd) ((abfd)->tdata.ecoff_obj_data)
  24.  
  25. typedef struct ecoff_tdata
  26. {
  27.   /* The reloc file position, set by
  28.      ecoff_compute_section_file_positions.  */
  29.   file_ptr reloc_filepos;
  30.  
  31.   /* The symbol table file position, set by ecoff_mkobject_hook.  */
  32.   file_ptr sym_filepos;
  33.  
  34.   /* The start and end of the text segment.  Only valid for an
  35.      existing file, not for one we are creating.  */
  36.   unsigned long text_start;
  37.   unsigned long text_end;
  38.  
  39.   /* The cached gp value.  This is used when relocating.  */
  40.   bfd_vma gp;
  41.  
  42.   /* The maximum size of objects to optimize using gp.  This is
  43.      typically set by the -G option to the compiler, assembler or
  44.      linker.  */
  45.   int gp_size;
  46.  
  47.   /* The register masks.  When linking, all the masks found in the
  48.      input files are combined into the masks of the output file.  */
  49.   unsigned long gprmask;
  50.   unsigned long cprmask[4];
  51.  
  52.   /* The size of the unswapped ECOFF symbolic information.  */
  53.   bfd_size_type raw_size;
  54.  
  55.   /* The unswapped ECOFF symbolic information.  */
  56.   PTR raw_syments;
  57.  
  58.   /* The swapped ECOFF symbolic header.  */
  59.   HDRR symbolic_header;
  60.  
  61.   /* Pointers to the unswapped symbolic information.  */
  62.   unsigned char *line;
  63.   struct dnr_ext *external_dnr;
  64.   struct pdr_ext *external_pdr;
  65.   struct sym_ext *external_sym;
  66.   struct opt_ext *external_opt;
  67.   union aux_ext *external_aux;
  68.   char *ss;
  69.   char *ssext;
  70.   struct fdr_ext *external_fdr;
  71.   struct rfd_ext *external_rfd;
  72.   struct ext_ext *external_ext;
  73.  
  74.   /* The swapped FDR information.  */
  75.   FDR *fdr;
  76.  
  77.   /* The FDR index.  This is set for an input BFD to a link so that
  78.      the external symbols can set their FDR index correctly.  */
  79.   unsigned int ifdbase;
  80.  
  81.   /* The canonical BFD symbols.  */
  82.   struct ecoff_symbol_struct *canonical_symbols;
  83.  
  84. } ecoff_data_type;
  85.  
  86. /* This is a hack borrowed from coffcode.h; we need to save the index
  87.    of an external symbol when we write it out so that can set the
  88.    symbol index correctly when we write out the relocs.  */
  89. #define ecoff_get_sym_index(symbol) ((unsigned long) (symbol)->udata)
  90. #define ecoff_set_sym_index(symbol, idx) ((symbol)->udata = (PTR) (idx))
  91.  
  92. /* Read in the ECOFF symbolic information.  FIXME: If there is ever
  93.    another ECOFF target, this function, and the swapping functions,
  94.    should be called via a target specific vector, as is done with the
  95.    functions in bfd_coff_backend_data.  */
  96. extern boolean ecoff_slurp_symbolic_info PARAMS ((bfd *));
  97.